﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Sys_projectadmin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            bindGridView(true);
        }
    }
    protected void AspNetPager1_PageChanged(object sender, EventArgs e)
    {
       bindGridView(false);
    }
    //行内命令
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName=="clear")
        {
            PM.PMSys.setmanager setmanager = new PM.PMSys.setmanager();
            string id = e.CommandArgument.ToString().Trim();
            setmanager.Clear_Manager(Int32.Parse(id), "p");
            bindGridView(false);
                //PM.Code.Web.alertmessage.ShowMsg(this.UpdatePanel1, "还未指定管理员，操作无效！");
        }
    }
    protected void bindGridView(bool GetCount)
    {
        PM.Code.Web.controlbind.BindGridViewPublicProc(GridView1, AspNetPager1, "Sys_Guide", "id", "id,btnname,incharge,inchargeid,inchargename,regisdate", "id", "1=1", GetCount);
    }
}
